package com.qzdatasoft.mcp.server.common;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ai.support.ToolCallbacks;

import java.util.List;

public interface IMcpToolProvider extends IMcpProvider {
    Logger log = LoggerFactory.getLogger(IMcpToolProvider.class);

    @Override
    default ProviderType getType() {
        return ProviderType.TOOL;
    }


    @Override
    default void afterPropertiesSet() throws Exception {
        McpFactory.getToolCallbackList().addAll(List.of(ToolCallbacks.from(this)));
        log.info("{} initialized.",  this.getClass().getName());
    }

}
